package bb;

import com.rt.dao.HeroDao;
import com.rt.dao.impo.impoDao;
import lombok.SneakyThrows;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;

@WebServlet("/hello")
public class Servletg extends HttpServlet {
    @SneakyThrows
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HeroDao dao=new impoDao();
        List ss=dao.getpager(1);
        request.setAttribute("lif0",ss);
        request.getRequestDispatcher("/diyi.jsp").forward(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request,response);
    }
}
